package Demo1;

import java.util.Objects;
public class User {
    private String username;
    private String passwrod;


    @Override
    public String toString() {
        return "User{" +
                "username='" + username + '\'' +
                ", passwrod='" + passwrod + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof User user)) return false;
        return Objects.equals(username, user.username) && Objects.equals(passwrod, user.passwrod);
    }

    @Override
    public int hashCode() {
        return Objects.hash(username, passwrod);
    }

    public String getPasswrod() {
        return passwrod;
    }

    public void setPasswrod(String passwrod) {
        this.passwrod = passwrod;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public User() {
    }

    public User(String username, String passwrod) {
        this.username = username;
        this.passwrod = passwrod;
    }
}
